/*
 * @Author: 李明明
 * @Date: 2021-03-29 09:11:06
 * @LastEditTime: 2021-03-31 21:45:38
 * @LastEditors: 学渣小明
 * @Description: 路由文件
 * @FilePath: /zhufeng_egg.js_2103/egg-example/app/router.js
 * 代码版权方：'政府采购信息网'
 */
'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  console.log(app.config.appMiddleware);
  console.log(app.config.coreMiddleware);
  router.get('/', controller.home.index);
  router.get('/article/:articleId/:tid', controller.article.delArticle);
  // 获取粉丝
  router.get('/get_user', controller.service.getUserService);
  // 上传文件
  router.post('/upload', controller.upload.uploadFile);
  // 模版引擎演示
  router.get('/ejs', controller.home.ejs);
  router.get('/handlebars', controller.home.handlebars);
  router.get('/nunjunks', controller.home.nunjunks);
  // github用户数据
  router.get('/githubInfoHbs', controller.service.githubHbs);
  router.get('/githubInfoEjs', controller.service.githubEjs);
  router.get('/githubInfoNj', controller.service.githubNj);
};
